<?php

// +----------------------------------------------------------------------
// | APP设备
// +----------------------------------------------------------------------
// | Copyright (c) 2015-2024 http://www.yicmf.com, All rights reserved.
// +----------------------------------------------------------------------
// | Author: 微尘 <yicmf@qq.com>
// +----------------------------------------------------------------------

namespace app\model\app;

use app\model\ucenter\User;
use think\model\concern\SoftDelete;

class AppTask extends Common
{

    use SoftDelete;

    /**
     * 写入修改
     * @param $data
     */
    public static function onBeforeWrite($data)
    {
        $data['ip'] = request()->ip();
    }

    public function getSelectBbZdAttr($value)
    {
        if (empty($value))
        {
            return [];
        }else{
            $value = json_decode($value, true); 
            return  array_values($value);
        }
    }
    protected $type = [
        'marks' => 'array',
        'bb' => 'array',
        'bb_zd' => 'array',
        'bb_zds' => 'array',
        'bz_fileds' => 'array',
        'select_bb_zd' => 'array',
        'tj_info_fileds' => 'array',
        'jobs' => 'array',
        'tags' => 'array',
        'jc_video' => 'array',
        'pz_fileds' => 'array',
    ];

}
